package com.hb.software.worker;


import com.hb.software.entity.worker.Worker;
import com.hb.software.service.BaseService;

import java.util.List;

public interface WorkerService extends BaseService<Worker, Long> {
    /**
     * 通过姓名查找
     *
     * @param name
     * @return
     */
    List findByName(String name);

    /**
     * 通过电话号码查找
     *
     * @param phone
     * @return
     */
    List findByPhone(String phone);

    /**
     * 通过部门查找
     *
     * @param did
     * @return
     */
    List<Worker> findByDepartment(Long did);

    /**
     * 获取最后一天记录id
     *
     * @return
     */
    public long findLastId();

    /**
     * 将数据库数据导出到excel文件
     *
     * @param list
     * @param path
     * @return
     */
    String createExcel(List<Worker> list, String path);

}
